﻿using CodeOften.Container;
using JingleBell.CommandShell;
using JingleBell.Interface;
using JingleBell.Library;

namespace JingleBell
{
    public class ServiceContext : IServiceContext
    {
        private readonly IServices _services = new Services();

        public ServiceContext()
        {
            RegisterManually();
        }

        public IServices Services
        {
            get { return _services; }
        }

        public void RegisterManually()
        {
            _services.AddService<IMainForm>(typeof (MainForm));
            _services.AddService<IProcessRunner>(typeof (ProcessRunner));
            _services.AddService<IProcessQueue>(typeof (ProcessQueue));
            _services.AddService<ICommandShellProcess>(typeof (CommandShellProcess));
        }
    }
}